private String GetHeaders(string url)
{
System.Net.HttpWebRequest fw = (HttpWebRequest)HttpWebRequest.Create(url/); //Connects to the url
                StringBuilder sb = new StringBuilder(); //Creates a string builder
                //Loops through all the headers
                for (int i = 0; i < fw.GetResponse().Headers.Count; i++)
                {
                    //Adds all the headers to the stringbuilder.
                    sb.AppendLine(fw.GetResponse().Headers[i].ToString());
                }
               return sb.ToString(); //This is how you access the hearders (e.g. Textbox.text = sb.ToString();
}